package com.itheima.zixi6.TCP2;

import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.ServerSocket;
import java.net.Socket;

public class Server {
    public static void main(String[] args) throws Exception {
        //1.创建ServerSocket对象，并且指定绑定的端口
        ServerSocket ss = new ServerSocket(8080);
        //2.调用accept方法，等待客户端连接请求
        while (true) {
            Socket socket = ss.accept();
            new ServerReaderThread(socket).start();
        }


    }
}


